package org.appfuse.webapp.plugin;

import javax.servlet.ServletException;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.SqlDateConverter;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;

public class ConverterPlugIn implements PlugIn {

	public void init(ActionServlet servlet, ModuleConfig config)
			throws ServletException {
		ConvertUtils.register(new SqlDateConverter(null), java.sql.Date.class);
	}

	public void destroy() {
		ConvertUtils.deregister();
	}
}
